package com.wx.exam.controller;

import com.wx.exam.pojo.Remark;
import com.wx.exam.service.RemarkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 评论控制器，提供添加评论的功能
 * @Author ychiha
 * @Date 2021/11/26 16:28
 * @Version 1.0
 */
@RestController
public class RemarkController {

    @Autowired
    RemarkService remarkService;

    @RequestMapping("/addremark")
    public Boolean addRemark(@RequestBody Remark remark){
        System.out.println("添加评论:"+remark);
        return remarkService.addRemark(remark);
    }
}
